﻿using SimpleNet.Net;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*********************************************************
 * 命名空间 Simple.BasicNet.Core.Net
 * 接口名称 DataPack
 * 开发人员：11920
 * 创建时间：2023/4/19 10:04:23
 * 描述说明：
 * 更改历史：
 * 
 * *******************************************************/
namespace SimpleNet
{
	public class DataPack:IDataPack
	{
		public DataPack() { Complete = false;}
		/// <summary>
		/// 缓冲区域
		/// </summary>
		public byte[] ReceiveBuffer { get { return receiveBuffer; } set { receiveBuffer = value; } }

		/// <summary>
		/// 消息头
		/// </summary>
		public byte[] HeaderBuffer { get { return headerBuffer; } set { headerBuffer = value; } }
		/// <summary>
		/// 消息尾部
		/// </summary>
		public byte[] TailBuffer { get { return tailBuffer; } set { tailBuffer = value; } }
		public byte[] CheckBuffer { get { return checkBuffer; } set { checkBuffer = value; } }
		public int CRC { get { return crc; } set { crc = value; } }
		public bool Complete { get { return complete; } set { complete = value; } }

		/// <summary>
		/// 消息id
		/// </summary>
		public int CommandID { get { return commandId; } set { commandId = value; } }
		/// <summary>
		/// 消息长度
		/// </summary>
		public int Length { get { return length; } set { length = value; } }

		private int length;
		private int commandId;
		private bool complete;
		private int crc;
		private byte[] checkBuffer;
		private byte[] tailBuffer;
		private byte[] headerBuffer;
		private byte[] receiveBuffer;
	}
}
